# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => '_profecrm_session_id'
  
  # Be sure to include AuthenticationSystem in Application Controller instead
  include AuthenticatedSystem
  include AuthorizedSystem

  private

  def find_customer
    if(params[:customer_id])
      @customer = Customer.find(params[:customer_id])
    end
    if(params[:conversation_id])
      @conversation = Conversation.find(params[:conversation_id])
    end
  end
end